﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Course.Models;
using System.Data.Objects;

namespace Course.DAO
{
    public class DBHelper:IDisposable
    {
        private static OperationalEntities entity = null;

        public static OperationalEntities Entity
        {
           
             get
             {
                 if(entity==null)
                 {
                     entity=new OperationalEntities();
                 }
                 return entity;
             }
        }

      
        public void Dispose()
        {
            entity.Dispose();
        }
    }
}